#pragma once

#include "Hal.h"

#include "Cserial.h"

class SerialHal : public Hal
{
public:
	SerialHal(void);
	virtual ~SerialHal(void);

	virtual bool Write(void* buf, DWORD len, DWORD& realLen);
	virtual void Read(void* buf, DWORD len, DWORD& realLen);

protected:
	virtual HANDLE CreateFile(CString fileName);
	virtual bool WriteReadEvent(HANDLE handle);

private:
	Cserial serial_;
};
